import Vue from "vue";
Vue.filter("filterTime", function(value) {
  if (value == null || value == "") {
    return "无";
  } else {
    let date = new Date(value);
    let Month = date.getMonth() + 1; //月份
    Month = Month < 10 ? "0" + Month : Month;

    let day = date.getDate(); //日子
    day = day < 10 ? "0" + day : day;

    let hour = date.getHours(); //小时
    hour = hour < 10 ? "0" + hour : hour;

    let minute = date.getMinutes(); //分钟
    minute = minute < 10 ? "0" + minute : minute;
    return Month + "月" + day + "日" + hour + "时" + minute + "分";
  }
});
